﻿using SH.Common.CommonReturn;
using SH.Customer.Domain.CustomerClass;
using SH.Customer.ErrorCodeEnum;
using SH.Customer.Infrastructure.IRepository;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SH.Customer.Infrastructure.Repository
{
    public class EquitiesRepository : BaseRepository<Equities>, IEquitiesRepository
    {
        private readonly ISqlSugarClient _context;
        public EquitiesRepository(ISqlSugarClient context) : base(DbManger.BizDb)
        {
            _context = DbManger.BizDb;
        }

        /// <summary>
        /// 权益删除
        /// </summary>
        /// <param name="eId"></param>
        /// <returns></returns>
        public ApiResult<int> DeleteEquities(int eId)
        {
            ApiResult<int> apiResult = new ApiResult<int>();
            var item = _context.Deleteable<Equities>().Where(x => x.EId ==eId ).ExecuteCommand();

            return apiResult;
        }
    }
}
